cc.Class({
    extends: cc.Component,

    properties: {
        sprIcon: cc.Sprite,
        labName: cc.Label,
    },

    init(data) {
        this.data = data;
        let url = 'push/icon/' + data.icon;
        G.common.setSpriteFrame(this.sprIcon, url);
        this.labName.string = data.name;
    },

    start() {
        this.node.on('touchstart', () => {
            G.partner.sendEvent('小游戏跳转', { '类型': this.data.name });
            G.partner.navigateToMiniProgram(this.data.appid);
        })
    },

    // update (dt) {},
});
